<template>
  <div class="project-block">
    <div class="swiper swiper-wrapper" v-swiper:mySwiper="swiperOption" >
      <div class="swiper-wrapper">
        <div
          class="swiper-slide"
          v-for="(item, index) in dataList"
          :key="index"
        >
          <div class="project-card">
            <div class="card-top">
              <h2 class="card-title">金融科技应用</h2>
              <img
                class="card-img"
                src="@/static/img/home/logo-project-1@2x.png"
                alt=""
              />
            </div>
            <div class="card-bottom">
              <p class="card-desc">民生银行深圳分行</p>
              <p class="card-desc">会员客户数字化管理和定制化场景营销服务</p>
              <div class="card-btn">了解更多</div>
            </div>
          </div>
        </div>
      </div>
      <div class="swiper-pagination" slot="pagination"></div>
      <div class="swiper-button-prev" slot="button-prev"></div>
      <div class="swiper-button-next" slot="button-next"></div>
    </div>
  </div>
</template>

<script>
if (process.browser) {
  var { WOW } = require("wowjs");
}

export default {
  data() {
    return {
      dataList: [1, 2, 3],
      swiperOption: {
        initialSlide: 0, //设定初始化时slide的索引
        // effect: "coverflow",
        slidesPerView: 1,
        spaceBetween: 0,
        // centeredSlides: true, //活动块会居中，而不是默认状态下的居左
        loop: true,
        speed: 1000,
        autoplay: {
          delay: 5000,
          stopOnLastSlide: false,
          disableOnInteraction: false,
        },
        observer: true, //修改swiper自己或子元素时，自动初始化swiper
        observeParents: true, //修改swiper的父元素时，自动初始化swiper
        // coverflowEffect: {
        //   rotate: 28, // slide做3d旋转时Y轴的旋转角度。默认50。
        //   stretch: 3, // 每个slide之间的拉伸值，越大slide靠得越紧。
        //   depth: 100, // slide的位置深度。值越大z轴距离越远，看起来越小。
        //   modifier: 1, // depth和rotate和stretch的倍率，相当于depth*modifier、rotate*modifier、stretch*modifier，值越大这三个参数的效果越明显。默认1。
        //   slideShadows: false, // 开启slide阴影。默认 true。
        // },
      },
    };
  },
  mounted() {
    if (process.browser) {
      new WOW({}).init();
    }
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.project-block {
  display: flex;
  align-items: center;
  // height: 874px;
  height: 100%;
  background: url("@/static/img/home/bj-project@2x.png") no-repeat;
  background-size: cover;
}
.project-card {
  width: 958px;
  height: 516px;
  background: url("@/static/img/home/bg-project-1@2x.png") no-repeat;
  background-size: contain;
  border-radius: 25px;
  .card-top {
    height: 192px;
    width: 100%;
    display: flex;
    padding-left: 148px;
    padding-right: 90px;
    align-items: center;
    justify-content: space-between;
    .card-img {
      width: 212px;
      height: 81px;
    }
    .card-title {
      font-family: Microsoft YaHei;
      font-weight: bold;
      color: #0083ce;
    }
  }

  .card-bottom {
    box-sizing: border-box;
    padding-top: 95px;
    padding-left: 148px;

    .card-desc {
      margin-bottom: 0;
      font-size: 30px;
      font-family: Microsoft YaHei;
      color: #737373;
    }

    .card-btn {
      width: 141px;
      line-height: 34px;
      margin-top: 27px;
      text-align: center;
      border: 2px solid #737373;
      color: #737373;
      border-radius: 17px;
      &:hover {
        border: 2px solid #0083ce;
        color: #0083ce;
        cursor: pointer;
      }
    }
  }
}


</style>
